<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>文章编辑</title>
    <link rel="shortcut icon" href="/img/logo.ico" type="image/x-icon">
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/js/jquery-3.4.1.js"></script>
    <script src="/layui/layui.js"></script>

    <!-- Markdown编辑器 -->
    <link rel="stylesheet" href="/css/editormd.css" />
    <link rel="stylesheet" href="/css/markdown.css" />
    <script src="/js/editormd.js"></script>
</head>
<div class="markbox">
    <div class="innerbox">
        <div id="mhead">
            <input type="text" style="display: none ;" id="userid" required autocomplete="off" class="layui-input"
                value="<%=user._id%>">
            <span class="layui-btn" id="mclose">
                <<文章管理</span> 
                
                
                <%if(articel!=""){%>
                    <label for="">标题</label><input type="text" class="mtitle" value="<%=articel.title%>">
                    <label for="">分类</label><input type="text" class="mcat" value="<%=articel.category[0]%>">
                    <button class="layui-btn" id="mudify" data-id=<%=articel._id%>>更新文章</button>
                <%}else{%>
                    <label for="">标题</label><input type="text" class="mtitle">
                    <label for="">分类</label><input type="text" class="mcat">
                    <button class="layui-btn" id="mpublished">发表文章</button>
                <%}%>
        </div>
        
    
        <div id="test-editormd">
            <textarea style="display:none;" id="ts" autofocus="autofocus"></textarea>
        </div>
        <span style="display: none;" id="contpro">
        <%if(articel!=""){%>
        <%=articel.contentpro%>
        <%}%>
        </span>
    </div>
</div>

<body>
<script src="/js/markdown.js"></script>

</body>

</html>